/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Alvaro
 */
@Entity
@Table(name = "company_adquired_profile_folder_state")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CompanyAdquiredProfileFolderState.findAll", query = "SELECT c FROM CompanyAdquiredProfileFolderState c"),
    @NamedQuery(name = "CompanyAdquiredProfileFolderState.findByIdCompanyAdquiredProfileFolderState", query = "SELECT c FROM CompanyAdquiredProfileFolderState c WHERE c.idCompanyAdquiredProfileFolderState = :idCompanyAdquiredProfileFolderState"),
    @NamedQuery(name = "CompanyAdquiredProfileFolderState.findByDescription", query = "SELECT c FROM CompanyAdquiredProfileFolderState c WHERE c.description = :description")})
public class CompanyAdquiredProfileFolderState implements Serializable {
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idCompanyAdquiredProfileFolderState")
    private List<CompanyAdquiredProfileFolderStateDescription> companyAdquiredProfileFolderStateDescriptionList;
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ID_COMPANY_ADQUIRED_PROFILE_FOLDER_STATE")
    private Integer idCompanyAdquiredProfileFolderState;
    @Size(max = 32)
    @Column(name = "DESCRIPTION")
    private String description;

    public CompanyAdquiredProfileFolderState() {
    }

    public CompanyAdquiredProfileFolderState(Integer idCompanyAdquiredProfileFolderState) {
        this.idCompanyAdquiredProfileFolderState = idCompanyAdquiredProfileFolderState;
    }

    public Integer getIdCompanyAdquiredProfileFolderState() {
        return idCompanyAdquiredProfileFolderState;
    }

    public void setIdCompanyAdquiredProfileFolderState(Integer idCompanyAdquiredProfileFolderState) {
        this.idCompanyAdquiredProfileFolderState = idCompanyAdquiredProfileFolderState;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCompanyAdquiredProfileFolderState != null ? idCompanyAdquiredProfileFolderState.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CompanyAdquiredProfileFolderState)) {
            return false;
        }
        CompanyAdquiredProfileFolderState other = (CompanyAdquiredProfileFolderState) object;
        if ((this.idCompanyAdquiredProfileFolderState == null && other.idCompanyAdquiredProfileFolderState != null) || (this.idCompanyAdquiredProfileFolderState != null && !this.idCompanyAdquiredProfileFolderState.equals(other.idCompanyAdquiredProfileFolderState))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.CompanyAdquiredProfileFolderState[ idCompanyAdquiredProfileFolderState=" + idCompanyAdquiredProfileFolderState + " ]";
    }

    @XmlTransient
    public List<CompanyAdquiredProfileFolderStateDescription> getCompanyAdquiredProfileFolderStateDescriptionList() {
        return companyAdquiredProfileFolderStateDescriptionList;
    }

    public void setCompanyAdquiredProfileFolderStateDescriptionList(List<CompanyAdquiredProfileFolderStateDescription> companyAdquiredProfileFolderStateDescriptionList) {
        this.companyAdquiredProfileFolderStateDescriptionList = companyAdquiredProfileFolderStateDescriptionList;
    }
    
}
